home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3dm / audiofile / AFgetmarkpos.z / AFgetmarkpos
Encoding:
Text File  |  1998-10-20  |  8.4 KB  |  133 lines

  1.  
  2.  
  3.  
  4. aaaaffffGGGGeeeettttMMMMaaaarrrrkkkkPPPPoooossssiiiittttiiiioooonnnn((((3333ddddmmmm))))                                  aaaaffffGGGGeeeettttMMMMaaaarrrrkkkkPPPPoooossssiiiittttiiiioooonnnn((((3333ddddmmmm))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      afGetMarkPosition, AFgetmarkpos, afSetMarkPosition, AFsetmarkpos -
  10.      get/set the position of a marker in an audio track
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////aaaauuuuddddiiiiooooffffiiiilllleeee....hhhh>>>>
  14.  
  15.      AAAAFFFFffffrrrraaaammmmeeeeccccoooouuuunnnntttt aaaaffffGGGGeeeettttMMMMaaaarrrrkkkkPPPPoooossssiiiittttiiiioooonnnn((((AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee ffffiiiilllleeee,,,, iiiinnnntttt ttttrrrraaaacccckkkkiiiidddd,,,, iiiinnnntttt mmmmaaaarrrrkkkkiiiidddd))))
  16.  
  17.      vvvvooooiiiidddd aaaaffffSSSSeeeettttMMMMaaaarrrrkkkkPPPPoooossssiiiittttiiiioooonnnn((((AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee ffffiiiilllleeee,,,, iiiinnnntttt ttttrrrraaaacccckkkkiiiidddd,,,, iiiinnnntttt mmmmaaaarrrrkkkkiiiidddd,,,,
  18.                                                  AAAAFFFFffffrrrraaaammmmeeeeccccoooouuuunnnntttt mmmmaaaarrrrkkkkppppoooossss))))
  19.  
  20. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRR
  21.      _f_i_l_e      is an AAAAFFFFffffiiiilllleeeehhhhaaaannnnddddlllleeee structure, previously created by a call to
  22.                aaaaffffOOOOppppeeeennnnFFFFiiiilllleeee(3dm).
  23.  
  24.      _t_r_a_c_k_i_d   expects a positive integer value which identifies an audio
  25.                track in _f_i_l_e.  All currently supported file formats allow
  26.                exactly one track per file, so the constant AAAAFFFF____DDDDEEEEFFFFAAAAUUUULLLLTTTT____TTTTRRRRAAAACCCCKKKK
  27.                should always be used here for now.
  28.  
  29.      _m_a_r_k_i_d    is a positive integer value which identifies a marker structure
  30.                in the audio track given by _t_r_a_c_k_i_d.
  31.  
  32.                You obtain marker ID's by calling aaaaffffGGGGeeeettttMMMMaaaarrrrkkkkIIIIDDDDssss(3dm).  You can
  33.                call aaaaffffIIIInnnniiiittttMMMMaaaarrrrkkkkIIIIDDDDssss(3dm) to assign your own ID's when you create
  34.                a new audio file.
  35.  
  36.      _m_a_r_k_p_o_s   is a nonnegative value of type AFframecount which marks a
  37.                location in an audio track.  This value should be  between 0
  38.                and the total number of audio sample frames stored in the
  39.                track, but can be set beyond EOF in the expectation of an
  40.                extension of the current track's length.
  41.  
  42. RRRREEEETTTTUUUURRRRNNNN VVVVAAAALLLLUUUUEEEE
  43.      aaaaffffGGGGeeeettttMMMMaaaarrrrkkkkPPPPoooossssiiiittttiiiioooonnnn(((()))) returns a value of type AFframecount representing the
  44.      location of the mark in the audio track, or -1 if there is an error.
  45.  
  46. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  47.      Markers point to locations "between" adjacent sample frames in an audio
  48.      track.
  49.  
  50.      If a track contains 500000 stereo sample pairs (frames), then the range
  51.      of possible marker positions is 0 to 500000.  Position 0 is before the
  52.      first frame, position 1 is between the first and second frames, position
  53.      500000 is after the last frame.
  54.  
  55.      You can use aaaaffffGGGGeeeettttMMMMaaaarrrrkkkkPPPPoooossssiiiittttiiiioooonnnn(((()))) to obtain the marker position stored in a
  56.      marker structure for an audio track.
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. aaaaffffGGGGeeeettttMMMMaaaarrrrkkkkPPPPoooossssiiiittttiiiioooonnnn((((3333ddddmmmm))))                                  aaaaffffGGGGeeeettttMMMMaaaarrrrkkkkPPPPoooossssiiiittttiiiioooonnnn((((3333ddddmmmm))))
  71.  
  72.  
  73.  
  74.      You can use aaaaffffSSSSeeeettttMMMMaaaarrrrkkkkPPPPoooossssiiiittttiiiioooonnnn(((()))) to set track position for a marker
  75.      structure in a file opened for write access.
  76.  
  77. EEEEXXXXAAAAMMMMPPPPLLLLEEEE
  78.      In AIFF and AIFF-C files, markers are used to delimit loop endpoints.
  79.  
  80.      If you want to define a sustain loop which starts at frame 100000 and
  81.      ends at frame 200000 in the above track, you would use two markers. You
  82.      would assign the position 99999 to the first marker, and the position
  83.      200000 to the second using aaaaffffSSSSeeeettttMMMMaaaarrrrkkkkPPPPoooossssiiiittttiiiioooonnnn(3dm).
  84.  
  85.      Then you would use the routines aaaaffffSSSSeeeettttLLLLooooooooppppSSSSttttaaaarrrrtttt(3dm) and aaaaffffSSSSeeeettttLLLLooooooooppppEEEEnnnndddd(3dm)
  86.      to attach the marker structures to the sustain loop structure.  Finally,
  87.      you would call aaaaffffSSSSeeeettttIIIInnnnssssttttPPPPaaaarrrraaaammmmLLLLoooonnnngggg(3dm) to map the loop ID to the sustain
  88.      loop location in the instrument configuration chunk.
  89.  
  90.      To read loop information out of an audio file, you'd first obtain loop
  91.      ID's for the sustain and release loop by calling aaaaffffGGGGeeeettttIIIInnnnssssttttPPPPaaaarrrraaaammmmLLLLoooonnnngggg(3dm).
  92.      Then you'd obtain marker ID's for the beginning and end points of the
  93.      loops by calling aaaaffffGGGGeeeettttLLLLooooooooppppSSSSttttaaaarrrrtttt(3dm) and aaaaffffGGGGeeeettttLLLLooooooooppppEEEEnnnndddd(3dm).
  94.  
  95.      Finally, you would obtain the positions of the individual markers by
  96.      calling aaaaffffGGGGeeeettttMMMMaaaarrrrkkkkPPPPoooossssiiiittttiiiioooonnnn(((()))).
  97.  
  98. NNNNOOOOTTTTEEEESSSS
  99.      It is now possible to retrieve the loop start and end frame directly
  100.      without using the associated markers (see aaaaffffGGGGeeeettttLLLLooooooooppppSSSSttttaaaarrrrttttFFFFrrrraaaammmmeeee(3dm)).
  101.      This is useful and necessary for audio file formats which support loops
  102.      which are independent of any markers, and for formats which support loops
  103.      but which do not support markers at all.  For formats which always
  104.      associate loops and markers, such as AAAAIIIIFFFFFFFF(4) and WWWWAAAAVVVVEEEE(4),
  105.      aaaaffffGGGGeeeettttLLLLooooooooppppSSSSttttaaaarrrrtttt(((()))) and aaaaffffGGGGeeeettttLLLLooooooooppppEEEEnnnndddd(((()))) will always return a valid ID for a
  106.      marker, but this marker may have been artifically generated by the AF.
  107.      If this is the case, the name of the marker (as retrieved via
  108.      aaaaffffGGGGeeeettttMMMMaaaarrrrkkkkNNNNaaaammmmeeee(3dm)) will be "start mark for loop id x" or "end mark for
  109.      loop id x", where _x is the loop ID.
  110.  
  111. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  112.      afOpenFile(3dm), afGetMarkIDs(3dm), afInitMarkIDs(3dm),
  113.      afGetInstParamLong(3dm), afGetLoopStart(3dm), afSetLoopStart(3dm)
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.